package com.campus.common.mapper;

import com.campus.common.domain.UserInfo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface UserInfoMapper {
    @Update("update user_info set online_status = #{onlineStatus} where user_id = #{userId}")
    public void changeOnlineStatus(Integer userId, Short onlineStatus);
    @Insert("insert into user_info(user_id, nickname, motto, online_status, avatar) value(#{userId}, #{nickname}, #{motto}, #{onlineStatus}, #{avatar}) ")
    public int insert(UserInfo userInfo);
}
